package com.six.action.settings;

import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;

import com.opensymphony.xwork2.ActionSupport;
import com.six.biz.IAdminManagementBiz;
import com.six.biz.IPermissionBiz;
import com.six.biz.impl.settings.IAdminManagementBizImpl;
import com.six.biz.impl.settings.IPermissionBizImpl;
import com.six.vo.User;

@Namespace("/settings")  
@ParentPackage(value = "settings") 
public class UserLoginAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8265288167804573284L;
	private IAdminManagementBiz adminbiz = new IAdminManagementBizImpl();//用户管理业务接口
	private IPermissionBiz permBiz = new IPermissionBizImpl();//权限管理业务接口
	private String rand;
	private String username;
	private String password;
	private User user;
	/**
	 * 用户登陆服务器响应方法
	 */
	public String login() throws Exception {
		adminbiz.loginByAccoutAndPassword(username, password);
		permBiz.findPermissionFromUserid(user.getUserID());
		return null;
		
	}
	/**
	 * 响应异步请求活的用户权限
	 */
	public String findPerms() throws Exception {
		return null;
		
	}
	
}
